#define _CRT_SECURE_NO_WARNINGS 1


#include<vector>
#include<set>
#include<iostream>

using namespace std;

bool hostschedule(vector<vector<int> >& schedule)
{
    set<int> tree;
    for (int i = 0; i < schedule.size(); i++)
    {
        for (int j = schedule[i][0] + 1; j < schedule[i][1]; j++)
        {
            if (tree.count(j))
            {
                return false;
            }
            tree.insert(j);
        }
    }
    return true;
}

int main()
{
    vector<vector<int>> v = { { 0,10 },{ 10,20 },{ 15,30 } };
    cout << hostschedule(v) << endl;

	return 0;
}